@import '../../../../styles/variables.less';

@home-item-block-height: 38px;
@home-item-block-large-height: 55px;
@home-item-block-vertical-height: 120px;
@home-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
@home-base-bg: @brand-grey;

:host {
  display: block;
  min-height: 100%;
  padding: 16px;
  background: @brand-bg;

  ::ng-deep {
    .card {
      padding: 16px;
      background: #fff;
      box-shadow: @home-box-shadow;
      &__hd {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
      }
      &__bd {
        &.fix-boundary {
          margin-bottom: -12px;
        }
      }
    }

    .info {
      background: #fff;
      box-shadow: @home-box-shadow;
      &__hd {
        width: 100%;
        height: 45px;
        padding-left: 16px;
        color: #666;
        font-size: 14px;
        line-height: 45px;
        background: @home-base-bg;
        border-bottom: 1px solid #f2f2f2;
      }
      &__bd {
        padding: 16px;
        &.fix-boundary {
          margin-bottom: -12px;
        }
      }
      &__custom-btn {
        display: block;
        height: 45px;
        color: #999;
        line-height: 45px;
        text-align: center;
        border: 1px dashed #c7c7c7;
        &:hover {
          color: @brand-color;
          border: 1px dashed @brand-color;
        }
      }
    }

    .item-block {
      display: flex;
      align-items: center;
      height: 38px;
      margin-bottom: 4px;
      line-height: 38px;
      text-decoration: none;
      background: @home-base-bg;
      border: 1px solid @home-base-bg;
      &:last-child {
        margin-bottom: 0;
      }
      &:hover {
        background: #fff;
        border: 1px solid @brand-color;
      }
      &__text,
      &__num {
        width: 50%;
      }
      &__text {
        padding-left: 16px;
        color: @grey-8;
      }
      &__num {
        margin-left: 16px;
        color: @grey-6;
        font-size: 18px;
        font-family: Georgia, serif;
        small {
          padding-left: 8px;
          font-size: 12px;
        }
      }
      &.large {
        height: @home-item-block-large-height;
        margin-bottom: 12px;
        line-height: @home-item-block-large-height;
        &:last-child {
          margin-bottom: 0;
        }
      }
      &.vertical {
        display: block;
        // need boorder width
        height: @home-item-block-vertical-height + 2px;
        margin-right: 16px;
        margin-bottom: 0;
        line-height: initial;
        text-align: center;
        &:last-child {
          margin-right: 0;
        }
        .item-block {
          &__text,
          &__num {
            width: 100%;
            padding: 0;
          }
          &__num {
            height: 60px;
            margin: 20px 0 0 0;
            font-size: 32px;
          }
        }
      }
    }

    // tabs
    .tabs {
      padding: 0;
      .ant-tabs {
        &-bar {
          margin-bottom: 0;
          background: @home-base-bg;
        }
        &-nav .ant-tabs-tab {
          margin-right: 0;
          font-weight: normal;
          font-size: 12px;
        }
      }
    }

    .recent {
      .item-block__text {
        width: 100%;
        padding: 0;
        text-align: center;
      }
    }

    .phecda {
      padding-top: 24px;
      padding-bottom: 24px;
      text-align: center;

      &,
      h2 {
        color: #fff;
      }
      .btn {
        display: inline-block;
        height: 36px;
        padding: 0 24px;
        color: #fff;
        font-size: 16px;
        line-height: 36px;
        border: 1px #fff solid;
        &:hover {
          color: @brand-color;
          text-decoration: none;
          background-color: #fff;
        }
      }
    }

    .consume {
      &-summary {
        padding: 32px 8px 32px 16px;
      }
      &-monthly {
        padding: 32px 16px 32px 8px;
      }
    }

    .balance {
      height: 108px;
      background: @home-base-bg;
      .num {
        display: block;
        margin-top: 8px;
        font-size: 24px;
        text-align: center;
      }
    }

    .coupon {
      margin-bottom: 13px;
      padding-left: 24px;
    }

    .monthly {
      &-wrap {
        height: 140px;
      }
      &-item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 32px;
        line-height: 32px;
        background: @home-base-bg;
        transition: all 0.2s, 0.2s;
        &__active {
          height: 44px;
          line-height: 44px;
        }
        &-num {
          z-index: 2;
          margin-left: 16px;
          color: #666;
          font-size: 14px;
          &-dark {
            color: #fff;
          }
        }
        &-month {
          padding-right: 8px;
          color: #90a0ae;
        }
        &-bg {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 1;
          width: 100px;
          height: 100%;
          &-1 {
            background: @blue-7;
          }
          &-2 {
            background: @blue-6;
          }
          &-3 {
            background: @blue-5;
          }
          &-4 {
            background: @blue-4;
          }
        }
      }
    }

    .ambassador {
      padding: 32px 12px;
      font-size: 12px;
    }

    .assistant {
      display: flex;
      align-items: center;
      height: 120px;
      margin-bottom: 12px;
      overflow: hidden;
      border: 1px solid #f2f2f2;
      &:last-child {
        margin-bottom: 0;
      }
      &:hover {
        border: 1px solid @brand-color;
        box-shadow: 0 0 20px rgba(0, 198, 226, 0.5);
      }
      &-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 0 8px;
        text-align: center;
        background-color: @home-base-bg;
        .iconfont {
          font-size: 24px;
          opacity: 0.5;
        }
      }
      &-content {
        padding: 0 16px;
      }
    }
  }
}
